package com.zmn.oms.dubbo.interfaces.quotation;

import com.zmn.common.dto2.ResponseDTO;
import com.zmn.oms.common.dio.quotation3.ArtificialPromDRO;
import com.zmn.oms.common.dio.quotation3.ArtificialPromListQuery;
import com.zmn.oms.common.dio.quotation3.CheckReportDIO;
import com.zmn.oms.common.dio.quotation3.MaintainFaultOptionQuery;
import com.zmn.oms.common.dio.quotation3.MaintainOptionDRO;
import com.zmn.oms.common.dro.quotation3.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @author sunlife
 * @date:2021/11/25 4:08 下午
 * description: 计价器3.0订单查询接口（流程）
 */
@Api("计价器3.0订单流程查询接口")
public interface Quotation3OrderWorkListRemoteService {

    /**
     * 获取计价器3.0订单详情（简化）
     *
     * @param orderId
     * @return
     */
    @ApiOperation("查询订单故障确认信息")
    ResponseDTO<Quotation3WorkDetailDRO> getWorkDetail(Long orderId, Long workId);

    /**
     * 获取优惠价格
     */
    @ApiOperation("提交检修信息")
    ResponseDTO<Integer> getDiscount(@Valid CheckReportDIO checkReportDIO);

    /**
     * 获取用户确认故障范围结果
     *
     * @param orderId
     * @return
     */
    @ApiOperation("查询订单故障确认信息")
    ResponseDTO<UserConfirmedFaultInfoDRO> getUserConfimedFaultInfo(Long orderId, Long workId);

    /**
     * 获取检修报告
     *
     * @param orderId
     * @return
     */
    @ApiOperation("获取检修报告")
    ResponseDTO<CheckReportDRO> getCheckReport(Long orderId, Long workId);

    /**
     * 刷新价格(2022年8月25日 16:08:09 一月后如没调用，可删除此接口)
     *
     * @param orderId
     * @param workId
     * @param discountId  优惠券id
     * @return
     */
    @ApiOperation("刷新价格")
    ResponseDTO<OrderAmountDRO> refreshOrderAmount(Long orderId, Long workId, Integer discountId);

    /**
     * 刷新价格
     *
     * @param orderId
     * @param workId
     * @param discountAmount  优惠金额
     * @return
     */
    @ApiOperation("刷新价格")
    ResponseDTO<OrderAmountDRO> refreshOrderAmount2(Long orderId, Long workId, Integer discountAmount);

    /**
     * 获取订单使用的工程师优惠信息
     *
     * @param orderId
     * @return
     */
    @ApiOperation("获取订单使用的工程师优惠信息")
    ResponseDTO<EngineerDiscountDRO> getOrderEngineerDiscount(Long orderId, Long workId);

    /**
     * 获取订单验收检测项目
     *
     * @param orderId
     * @param workId
     * @return
     */
    @ApiOperation("获取订单验收项目检测信息")
    ResponseDTO<List<OrderAcceptMaintainItemDRO>> listOrderAcceptMaintainItemByOrderIdAndWorkId(@NotNull(message = "订单号不能为空")
                                                                                                @ApiParam(value = "订单号")
                                                                                                        Long orderId,
                                                                                                @NotNull(message = "工单号不能为空")
                                                                                                @ApiParam(value = "工单号")
                                                                                                        Long workId);

    /**
     * 人工优惠信息列表
     *
     * @param query
     * @return
     */
    @ApiOperation("人工优惠信息列表")
    ResponseDTO<List<ArtificialPromDRO>> listArtificialProm(@NotNull(message = "入参不能为null") ArtificialPromListQuery query);

    /**
     * 描述: 根据故障id和检测项目id选项id返回应该选择的选项
     *
     * @param maintainFaultOptionQuery 维护故障选择查询
     * @return {@link ResponseDTO }<{@link List }<{@link MaintainOptionDRO }>>
     * @author chengguang
     * @since 2022/08/15
     */
    @ApiOperation("根据故障id和检测项目id选项id返回应该选择的选项")
    ResponseDTO<List<MaintainOptionDRO>> listMaintainOptionByMfoQuery(@NotNull(message = "maintainFaultOptionQuery为null")
                                                                              MaintainFaultOptionQuery maintainFaultOptionQuery);


    /**
     * 处理优惠
     * 存在优惠大于应收金额的情况，或者一口价需要单独处理
     * @param orderId
     * @param workId
     * @param discountAmount 优惠金额
     * @return
     */
    @ApiOperation("处理优惠")
    ResponseDTO<Integer> processArtificial(@NotNull(message = "入参不能为null") Long orderId,@NotNull(message = "入参不能为null")Long workId,@NotNull(message = "优惠金额不能为空") Integer discountAmount);
}
